package com.chx.controller;

import com.chx.dto.StockLogPageQueryDto;
import com.chx.result.PageResult;
import com.chx.result.Result;
import com.chx.service.StockLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author cp-月入过万
 * @Date 2025/5/31
 */
 @RestController
 @RequestMapping("/admin/stock-log")
 @Api(tags = "库存流水相关接口")
 @Slf4j
public class StockLogController {
     @Autowired
     private StockLogService stockLogService;
    /**
     * 分页查询库存流水
     */
    @GetMapping("/page")
    @ApiOperation(value = "分页查询库存流水")
    public Result<PageResult> page(StockLogPageQueryDto stockLogPageQueryDto) {
        PageResult pageResult = stockLogService.pageQuery(stockLogPageQueryDto);
        return Result.success(pageResult);
    }
}
